As one example of a single-inheritance, container-based data processing system, Docker™ is an open platform for developing, shipping, and running applications. (Docker and other Docker-based marks discussed herein are trademarks or registered trademarks of Docker, Inc., of San Francisco, Calif., USA.) At their core, such systems provide a way to run almost any application securely isolated in a container. A container may consist of an application, user-added files, and metadata for an application. Each container is built from an image, which may specify what the container holds, what process to run when the container is launched, and a variety of other configuration data. The image is a read-only template from which the container is launched. The image may consist of a series of layers. When an image needs to be changed (for example, an application needs to be updated to a new version), a new layer may get built. Rather than replacing or entirely rebuilding the whole image as may be done with a virtual machine, only that layer needs to be added or updated.
An image may start from a base image. Further, images generated for one container can be used as the basis for new images for another container. For example, if a base image has been generated, it could be used as the base image for web applications of other containers. An image can be built from these base images using a set of instructions, each of which creates a new layer in the image. However, because these layers within the image are overlays in a single inheritance tree, duplicated layers may be inevitably introduced while the image is being built. In addition, such layer duplication cannot be eliminated simply by writing the set of instructions carefully or merging multiple layers into one layer. Similar problems exist for other containerization technologies.